package ru.amse.tsyganov.jumleditor.validator;

public enum TransitionsAmount {
	NULL {
		public boolean check(int i) {
			return i == 0;
		}
		
		public String toString() {
			return "null";
		}
	},
	ONE {
		public boolean check(int i) {
			return i == 1;
		}
		
		public String toString() {
			return "one";
		}
	},
	TWO {
		public boolean check(int i) {
			return i == 2;
		}
		
		public String toString() {
			return "two";
		}
	},
	MORE_THAN_NULL {
		public boolean check(int i) {
			return i > 0;
		}
		
		public String toString() {
			return "more then null";
		}
	},
	MORE_THAN_TWO {
		public boolean check(int i) {
			return i > 2;
		}
		
		public String toString() {
			return "more then two";
		}
	};
	public abstract boolean check(int i);
}
